<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>菜单管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <!--    <script rel="script" type="text/javascript" th:src="@{/js/jquery-3.5.1.min.js}"></script>-->
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}"  media="all">
    <script rel="script" type="text/javascript" th:src="@{/layui/layui.js}"></script>
    <script rel="script" type="text/javascript" th:src="@{/js/menuManager.js}"></script>
    <script rel="script" type="text/javascript" th:src="@{/js/formVerify.js}"></script>

</head>
<body>
<script type="text/html" id="topTools">
    <button type="button" class="layui-btn layui-btn-normal" lay-event="createNewMenu">新增菜单</button>
    <div class="layui-inline">
        <form class="layui-form layui-form-pane" lay-filter="categoryForm">
            <input id="searchMenuName" name="searchMenuName" type="text" class="layui-input-block" placeholder="请输入查询关键字" autocomplete="off"/>
            <input type="radio" title="父菜单" value="0" name="menuType" lay-filter="menuType">
            <input type="radio" title="子菜单" value="9" name="menuType" lay-filter="menuType">
            <input type="radio" title="全部" value="" name="menuType" lay-filter="menuType">
            <div class="layui-btn-container layui-inline">
                <button type="button" class="layui-btn layui-btn-normal" lay-event="searchMenu">搜索菜单</button>
            </div>
        </form>
    </div>

</script>
<!--<button id="disableRole" type="button" class="layui-btn" style="margin-left: 40% ; display: none" onclick="" >禁用角色</button>-->
<!--<button id="enableRole" type="button" class="layui-btn" style="margin-left: 40% ; display: none" onclick="" >启用角色</button>-->
<table class="layui-hide" id="menusList" lay-filter="menusList"></table>

<script type="text/html" id="menuOperator">
    {{# if(d.id != 3 && d.parentId !=3){  }}
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    <a class="layui-btn  layui-btn-xs" lay-event="edit">编辑</a>

    {{# } }}
</script>





<div id="createMenu" class="layui-form" style="display: none">
    <form class="layui-form layui-form-pane">
        <label class="layui-form-label">菜单名</label><input type="text" name="title" class="layui-input" lay-verify="required" style="width: 40%" autocomplete="off" ><br>
        <label class="layui-form-label">URL</label><input type="text" name="url" class="layui-input" lay-verify="required" style="width: 40%"><br>
        <label class="layui-form-label">父菜单</label>
        <div class="layui-input-block" style="width: 40%">
            <select id="parentMenuSelect" lay-filter="parentMenu"  class="select">
                <option value="0">无父级菜单</option>
            </select>
        </div>
        <hr class="hr15">
        <button type="button" action="javascript:void(0)" lay-filter="createMenu" lay-submit="" class="layui-btn" style="margin-left: 40%">新增菜单</button>
    </form>
</div>
</body>
<script>

</script>
</html>